POV-Ray : Newsgroups : povray.general : Problem using difference with height_field : Re: Problem using difference with height_field Server Time
9 Aug 2024 15:23:09 EDT (-0400)
  Re: Problem using difference with height_field  
From: Ken
Date: 29 Jun 2000 22:32:54
Message: <395C05D7.36D917D0@pacbell.net>
Patrick Dugan wrote:
> 
> I am pretty familiar with the difference command.  The cone is being removed
> from the table top.

It is important to remember that a HF object is much like a sheet of
paper. It is considered an infinately thin object. So trying to make
a hole in a HF requires that you provide the hole material for it.
Otherwise all you are really doint is making a cutout in the surface
of the HF itself.

Try the following steps -

1. intersect the cone by the HF - use the open keyword with the cone
   (This step creates the hole material with a top that conforms to
    the irregular features of the surface of the HF object) You might
    also try clipping the cone with the HF if this step does not work
    as described.

#declare Cone =
intersection {
               cone{<...>,.,<...>,. open}
               height_field {}
             }

2. difference the HF with another cone of the same size and location
   - do not use the open keyword with this cone. (This step creates
   the cutout through the HF. You could as easily use an intesection
   for this operation)

#declare HF =
difference {
             height_field {}
             cone {}
           }

3. union the intersected cone with the differenced HF. (This step
   combines your "hole" with the HF object to create the effect
   you are looking for - I hope).

union {
       object{Cone}
       object{HF  }
      }


This might work but I have not verified it.

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.